package com.example.springfeature.bean;

import com.example.springfeature.jsr303.FlagValue;
import com.example.springfeature.jsr303.TimeValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
@ApiModel("testReq")
public class TestReq extends BaseParam {

    /**
     * 是否移除表前缀
     */

    @FlagValue(message = "是否移除表前缀格式错误，正确格式应该Y或者N，请检查tablePrefix参数",
            groups = {select.class})
    @ApiModelProperty(value = "是否移除表前缀", example = "Y", required = true)
    @NotBlank(message = "是否移除表前缀不能为空，请检查tablePrefix参数",
            groups = {select.class})
    private String prefix;

    /**
     * 生成方式
     */
//    @NotBlank(message = "生成方式不能为空，请检查generateType参数", groups = {select.class})
    @ApiModelProperty(value = "生成方式", example = "auto")
    private String type;


    //    @NotBlank(message = "keyLock不能为空，请检查keyLock参数", groups = {select.class})
    @ApiModelProperty(value = "keyLock", example = "lock")
    private String keyLock;


    @TimeValue(message = "时分秒格式错误，正确格式应该HH:mm:ss", groups = {time.class})
    @NotBlank(message = "timeStr不能为空", groups = {time.class})
    @ApiModelProperty(value = "粗略的时间：HH:mm:ss格式", example = "12:23:35")
    private String timeStr;


}
